<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    
	
	<title>_入库信息</title>
	
    <script type="text/javascript">

	</script>
	
</head>



<body>
<section class="content">
	<div class="form-group row">
		<div class="col-md-12">
			<div class="box box-solid box-primary">
				<div class="box-header">
				<i class="fa fa-list"></i>
					<h3 class="box-title">入库单信息</h3>
					<div class="box-tools pull-right">
						<button class="btn btn-primary btn-sm" data-widget="collapse">
							<i class="fa fa-minus"></i>
						</button>
					</div>
				</div>
				<div class="box-body">
				
	<!-- 入库单信息 -->
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		
		<thead><tr>
		    <th>商家</th>
		    <th>入库单号</th>
		    <th>出库仓</th>
		    <th>入库仓</th>
		    <th>入库类型</th>
			<th>入库状态</th>
		</tr></thead>
		
		<tr>
		   <td>${inBill.customer.customerName}</td>
		   <td>${inBill.billCode}</td>
		   <td>${inBill.outwarehouse.groupName}</td>
		   <td>${inBill.inwarehouse.groupName}</td>
		   <td>
		      <!-- 入库单类型 (customer.采购入库  allot.调拨入库   cancelOrder.取消单入库     returnOrder：退回件入库     preOrder:预约入库) -->
		      <c:if test="${inBill.billType eq 'customer'}">采购入库</c:if>
		      <c:if test="${inBill.billType eq 'preOrder'}">预约入库</c:if>
		      <c:if test="${inBill.billType eq 'allot'}">调拨入库</c:if>
		      <c:if test="${inBill.billType eq 'cancelOrder'}">取消单入库</c:if>
		      <c:if test="${inBill.billType eq 'returnOrder'}">退回件入库</c:if>
		   </td>
		   <td>
		     <!-- 入库状态 （0:待登记 (调拨货品已出库，尚未入库，或预约入库) 1.入库登记 2.领取点收任务 3.点收完成 4.领取上架任务 5.上架完成 ） -->
		     <c:if test="${inBill.status eq '0'}"><font color=red>待登记</font></c:if>
		     <c:if test="${inBill.status eq '1'}"><font color=red>入库登记</font></c:if>
		     <c:if test="${inBill.status eq '2'}"><font color=red>领取点收任务</font></c:if>
		     <c:if test="${inBill.status eq '3'}"><font color=red>点收完成</font></c:if>
		     <c:if test="${inBill.status eq '4'}"><font color=red>领取上架任务</font></c:if>
		     <c:if test="${inBill.status eq '5'}"><font color=green>上架完成</font></c:if>
		     <c:if test="${inBill.status eq '6'}"><font color=red>已取消</font></c:if>
		  </td>
		</tr>
		
		<thead><tr>
		    <th>箱子数量</th>
		    <th>sku数量</th>
		    <th>商品数量</th>
			<th>相关单号</th>
			<th>商品类型（正常/破损）</th>
			<th>备注</th>
		</tr></thead>
		
		<tr>
		   <td>${inBill.boxNum}</td>
		   <td>${inBill.skuNum}</td>
		   <td>${inBill.goodsNum}</td>
		   <td>${inBill.aboutCode}</td>
		   <td>
		     <c:if test="${inBill.errorFlag eq 'error'}"><font color=red>破损件</font></c:if>
		     <c:if test="${inBill.errorFlag ne 'error'}">正常件</c:if> 
		   </td>
		   <td>${inBill.remarks}</td>
		</tr>
		 
	</table>
	</div>
	</div>
	</div>
	</div>
	
	
	<div class="form-group row">
		<div class="col-md-12">
			<div class="box box-solid box-primary">
				<div class="box-header">
				<i class="fa fa-list"></i>
					<h3 class="box-title">点收数据</h3>
					<div class="box-tools pull-right">
						<button class="btn btn-primary btn-sm" data-widget="collapse">
							<i class="fa fa-minus"></i>
						</button>
					</div>
				</div>
				<div class="box-body">
	<!-- 入库数据 -->
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead><tr>
		    <th>序号</th>
		    <th>入库方式</th>
			<th>是否破损</th>
			<th>上架状态</th>
			<th>SKU</th>
			<th>商品名称</th>
			<th>批次号</th>
			<th>生产日期</th>
			<th>过期日期</th>
		    <th>数量</th>
		 </tr></thead>
		 
		 <c:forEach  items="${countItemList}" var="item" varStatus="i">
			 <tr>
			   <td>${i.count}</td>
			   <td>
			     <c:if test="${item.instorageType eq 'box'}"><font color=green>整箱</font></c:if>
			     <c:if test="${item.instorageType eq 'single'}"><font color=blue>散装</font></c:if>
			   </td>
			   <td>
			     <c:if test="${item.errorFlag eq 'error'}"><font color=red>破损件</font></c:if>
			     <c:if test="${item.errorFlag ne 'error'}"><font color=black>正常件</font></c:if> 
			   </td>
			   <td>
			      <c:if test="${item.upStatus eq 'up'}"><font color=green>已上架</font></c:if>
			      <c:if test="${item.upStatus eq 'uping'}"><font color=red>上架中</font></c:if>
			      <c:if test="${item.upStatus eq 'unup'}"><font color=blue>未上架</font></c:if>
			   </td>
			   <td>${item.sku}</td>
			   <td>${item.ediGoodsSku.skuName}</td>
			   <td>${item.batchCode}</td>
			   <td>${item.productDate}</td>
			   <td>${item.expireDate}</td>
			   <td>${item.num}</td>
			 </tr>
		 </c:forEach>
		 
	</table>
	</div>
	</div>
	</div>
	</div>
	
	<div class="form-group row">
		<div class="col-md-12">
			<div class="box box-solid box-primary">
				<div class="box-header">
				<i class="fa fa-list"></i>
					<h3 class="box-title">上架数据</h3>
					<div class="box-tools pull-right">
						<button class="btn btn-primary btn-sm" data-widget="collapse">
							<i class="fa fa-minus"></i>
						</button>
					</div>
				</div>
				<div class="box-body">
	<!-- 入库数据 -->
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead><tr>
		    <th>序号</th>
			<th>箱编码</th>
			<th>库位编码</th>
			<th>SKU</th>
			<th>商品名称</th>
			<th>批次号</th>
			<th>生产日期</th>
			<th>过期日期</th>
		    <th>数量</th>
		 </tr></thead>
		 
		 <c:forEach  items="${upItemList}" var="item" varStatus="i">
			 <tr>
			   <td>${i.count}</td>
			   <td>${item.boxCode}</td>
			   <td>${item.stockCode}</td>
			   <td>${item.skuCode}</td>
			   <td>${item.ediGoodsSku.skuName}</td>
			   <td>${item.batchCode}</td>
			   <td>${item.productDate}</td>
			   <td>${item.expireDate}</td>
			   <td>${item.num}</td>
			 </tr>
		 </c:forEach>
		 
	</table>
	</div>
	</div>
	</div>
	</div>
	
	
	<div class="form-group row">
		<div class="col-md-12">
			<div class="box box-solid box-primary">
				<div class="box-header">
				<i class="fa fa-list"></i>
					<h3 class="box-title">入库日志信息</h3>
					<div class="box-tools pull-right">
						<button class="btn btn-primary btn-sm" data-widget="collapse" type="button">
							<i class="fa fa-minus"></i>
						</button>
					</div>
				</div>
	<div class="box-body">
	  <!-- 入库日志 -->	
	<table id="contentTable" class="table  table-bordered table-condensed">
		<thead><tr>
		   <!--  <th style="width: 100px;">处理人</th> -->
		    <th style="width: 170px;">处理时间</th>
			<th style="width: 100px;">处理环节</th>
			<th >描述</th>
		</tr></thead>
		<c:forEach  items="${logList}" var="log">
			 <tr>
		       <%-- <td>${log.workerUuid}</td> --%>
		       <td>${fn:substring(log.workTime,0,19)}</td>
		       <td>
		         <!-- 操作类型 (sign.登记入库单 takeCountTask.领取点收任务 finishCount.点收完成 taskUpTask.领取上架任务 finishUp.上架完成 ) -->
		          <c:if test="${log.workType eq 'sign' }">登记入库单</c:if>
			      <c:if test="${log.workType eq 'takeCountTask' }">领取点收任务 </c:if>
			      <c:if test="${log.workType eq 'finishCount' }">点收完成</c:if>
			      <c:if test="${log.workType eq 'taskUpTask' }">领取上架任务</c:if>
			      <c:if test="${log.workType eq 'finishUp' }">上架完成</c:if>
		       </td>
		       <td>${log.info}</td>
			 </tr>
		</c:forEach>
	</table>
	</div>
	</div>
	</div>
	</div>
	
	
</section>	
</body>
</html>
